package com.company;

import cn.hutool.core.util.HexUtil;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;

public class Main {

    public static void main(String[] args) {
        try {
            String content = "370125201609260214";
            String key = "identityCard";
            String str = EncryptUtil.encrypt(content,key);

            System.err.println(str);
            String hexString = HexUtil.encodeHexStr(str).toUpperCase();
            System.err.println(hexString);

            String decodedString = HexUtil.decodeHexStr(hexString);
            System.err.println(decodedString);
            String str1 = EncryptUtil.decrypt(decodedString,key);
            System.err.println(str1);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
